<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

        <tr>
          <td width="71%"> 
    		 <c:set var="usualTimeVar" value=""  />
		  <div align="center" class="boldtext style7"><strong>Manage Timeslots</strong></div>		  </td>
   </tr>
        <tr>
          <td class="boldtext style7">
		  &nbsp;&nbsp;&nbsp;
		  <select name="theaterId" onChange="getTimeSlots()" >
		  <option>Select a Theater</option>
		  <c:forEach var="theater" items="${requestScope.Theater_Array}" >
		  
		  <c:choose>
		  <c:when test="${theater.theaterId eq requestScope.theaterId}" >
            <option value="<c:out value="${theater.theaterId}" />" selected><c:out value="${theater.theaterName}" /></option>
          </c:when>
          <c:otherwise >
            <option value="<c:out value="${theater.theaterId}" />"><c:out value="${theater.theaterName}" /></option>
          </c:otherwise>
		  </c:choose>    
		  </c:forEach>
          </select>		  
		  </td>
        </tr>
		 <tr>
		 <td>
		   <table>
		    <tr>
		   <td height="32">
		   <select name="timeSlot" size="10" onClick="setModifiedTime()" >
          <c:choose>
		  <c:when test="${empty requestScope.timeSlotArr}">
			 <option>No TimeSlots Exist</option>
		   </c:when> 
		   <c:otherwise>
		    <c:forEach var="timeslot" items="${requestScope.timeSlotArr}" varStatus="status" >
		    
		    <c:choose>
		    <c:when test="${status.count==1}" >
				 <option selected value="<c:out value="${timeslot.timeSlotId}" />" >
				<c:set var="usualTimeVar"  value="${timeslot.usualTime}"  />
			</c:when>	    
			<c:otherwise>
				 <option value="<c:out value="${timeslot.timeSlotId}" />" >
			</c:otherwise>
			</c:choose>
SLOT<c:out value="${timeslot.slotNo}" />  				
					  :  <c:out value="${timeslot.usualTime}" />					
				  </option>
			 </c:forEach>
		   </c:otherwise>
		  </c:choose>	 
           </select>
			</td>
			 <td>
			
			   <table width="234" border="0">
                 <tr>
                   <td width="228" height="25">
				   <input type="submit" name="Submit3" value="Remove Last Timeslot" 
				   onClick="removeLastTimeSlot()"/>
				   </td>
                 </tr>
                 <tr>
                   <td>&nbsp;</td>
                 </tr>
                 <tr>
                   <td height="23"><input type="text" name="modifiedTime"  value="${usualTimeVar}" />
                   <input type="submit" name="Submit" value="Modify"  onClick="modifyTimeslot()" />
				   </td>
                 </tr>
                 <tr>
                   <td height="23">Add Timeslot</td>
                 </tr>
                 <tr>
                   <td height="23">
				   <select name="slotHours">
				   <option value="1" >1</option>
				   <option value="2">2</option>
				   <option value="3">3</option>
				   <option value="4">4</option>
				   <option value="5">5</option>				   				   				   				   							   				   				   				   				   
  				   <option value="5">5</option>	
				   <option value="6">6</option>	
				   <option value="7">7</option>						 
  				   <option value="8">8</option>	
				   <option value="9">9</option>	
				   <option value="10">10</option>
				   <option value="11">11</option>	
				   <option value="12">12</option>				   				   
				   </select>
				   :
				   <select name="slotMin1" >
   				   <option value="1">1</option>
				   <option value="2">2</option>
				   <option value="3">3</option>
				   <option value="4">4</option>
				   <option value="5">5</option>				   				   				   				                 
				</select>
				<select name="slotMin2">
				   <option value="1" >1</option>
				   <option value="2">2</option>
				   <option value="3">3</option>
				   <option value="4">4</option>
				   <option value="5">5</option>				   				   				   				   				 
  				   <option value="5">5</option>	
				   <option value="6">6</option>	
				   <option value="7">7</option>						 
  				   <option value="8">8</option>	
				   <option value="9">9</option>				   				   				   				   				  
				</select>
				<select name="slotZone" >
				   <option value="AM">AM</option>
				   <option value="PM">PM</option>				   
				</select>
                   <input type="submit" name="Submit2" value="Add    "  onClick="addTimeslot()"/></td>
                 </tr>
               </table>			 </td>
  	       </tr>
		   </table>
		   </td>
  	    </tr>
		 <tr>
          <td height="32"><div align="center"></div></td>
        </tr>

